\(\int (a+b \sqrt {x})^2 x^m \, dx\) [2259]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 47 \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=\frac {a^2 x^{1+m}}{1+m}+\frac {4 a b x^{\frac {3}{2}+m}}{3+2 m}+\frac {b^2 x^{2+m}}{2+m} \]

[Out]

a^2*x^(1+m)/(1+m)+4*a*b*x^(3/2+m)/(3+2*m)+b^2*x^(2+m)/(2+m)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {276} \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=\frac {a^2 x^{m+1}}{m+1}+\frac {4 a b x^{m+\frac {3}{2}}}{2 m+3}+\frac {b^2 x^{m+2}}{m+2} \]

[In]

Int[(a + b*Sqrt[x])^2*x^m,x]

[Out]

(a^2*x^(1 + m))/(1 + m) + (4*a*b*x^(3/2 + m))/(3 + 2*m) + (b^2*x^(2 + m))/(2 + m)

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (a^2 x^m+2 a b x^{\frac {1}{2}+m}+b^2 x^{1+m}\right ) \, dx \\ & = \frac {a^2 x^{1+m}}{1+m}+\frac {4 a b x^{\frac {3}{2}+m}}{3+2 m}+\frac {b^2 x^{2+m}}{2+m} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.89 \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=x^{1+m} \left (\frac {a^2}{1+m}+\frac {4 a b \sqrt {x}}{3+2 m}+\frac {b^2 x}{2+m}\right ) \]

[In]

Integrate[(a + b*Sqrt[x])^2*x^m,x]

[Out]

x^(1 + m)*(a^2/(1 + m) + (4*a*b*Sqrt[x])/(3 + 2*m) + (b^2*x)/(2 + m))

Maple [F]

\[\int x^{m} \left (a +b \sqrt {x}\right )^{2}d x\]

[In]

int(x^m*(a+b*x^(1/2))^2,x)

[Out]

int(x^m*(a+b*x^(1/2))^2,x)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.89 \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=\frac {{\left ({\left (2 \, b^{2} m^{2} + 5 \, b^{2} m + 3 \, b^{2}\right )} x^{2} + 4 \, {\left (a b m^{2} + 3 \, a b m + 2 \, a b\right )} x^{\frac {3}{2}} + {\left (2 \, a^{2} m^{2} + 7 \, a^{2} m + 6 \, a^{2}\right )} x\right )} x^{m}}{2 \, m^{3} + 9 \, m^{2} + 13 \, m + 6} \]

[In]

integrate(x^m*(a+b*x^(1/2))^2,x, algorithm="fricas")

[Out]

((2*b^2*m^2 + 5*b^2*m + 3*b^2)*x^2 + 4*(a*b*m^2 + 3*a*b*m + 2*a*b)*x^(3/2) + (2*a^2*m^2 + 7*a^2*m + 6*a^2)*x)*
x^m/(2*m^3 + 9*m^2 + 13*m + 6)

Sympy [A] (verification not implemented)

Time = 0.82 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.66 \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=a^{2} \left (\begin {cases} \frac {x^{m + 1}}{m + 1} & \text {for}\: m \neq -1 \\\log {\left (x \right )} & \text {otherwise} \end {cases}\right ) + 4 a b \left (\begin {cases} \frac {x^{\frac {3}{2}} x^{m}}{2 m + 3} & \text {for}\: m \neq - \frac {3}{2} \\x^{\frac {3}{2}} x^{m} \log {\left (\sqrt {x} \right )} & \text {otherwise} \end {cases}\right ) + b^{2} \left (\begin {cases} \frac {x^{2} x^{m}}{m + 2} & \text {for}\: m \neq -2 \\x^{2} x^{m} \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate(x**m*(a+b*x**(1/2))**2,x)

[Out]

a**2*Piecewise((x**(m + 1)/(m + 1), Ne(m, -1)), (log(x), True)) + 4*a*b*Piecewise((x**(3/2)*x**m/(2*m + 3), Ne
(m, -3/2)), (x**(3/2)*x**m*log(sqrt(x)), True)) + b**2*Piecewise((x**2*x**m/(m + 2), Ne(m, -2)), (x**2*x**m*lo
g(x), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.96 \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=\frac {b^{2} x^{m + 2}}{m + 2} + \frac {4 \, a b x^{m + \frac {3}{2}}}{2 \, m + 3} + \frac {a^{2} x^{m + 1}}{m + 1} \]

[In]

integrate(x^m*(a+b*x^(1/2))^2,x, algorithm="maxima")

[Out]

b^2*x^(m + 2)/(m + 2) + 4*a*b*x^(m + 3/2)/(2*m + 3) + a^2*x^(m + 1)/(m + 1)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.23 \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=\frac {b^{2} x^{2} \sqrt {x}^{2 \, m}}{m + 2} + \frac {4 \, a b x^{\frac {3}{2}} \sqrt {x}^{2 \, m}}{2 \, m + 3} + \frac {a^{2} x \sqrt {x}^{2 \, m}}{m + 1} \]

[In]

integrate(x^m*(a+b*x^(1/2))^2,x, algorithm="giac")

[Out]

b^2*x^2*sqrt(x)^(2*m)/(m + 2) + 4*a*b*x^(3/2)*sqrt(x)^(2*m)/(2*m + 3) + a^2*x*sqrt(x)^(2*m)/(m + 1)

Mupad [B] (verification not implemented)

Time = 5.75 (sec) , antiderivative size = 103, normalized size of antiderivative = 2.19 \[ \int \left (a+b \sqrt {x}\right )^2 x^m \, dx=x^m\,\left (\frac {b^2\,x^2\,\left (2\,m^2+5\,m+3\right )}{2\,m^3+9\,m^2+13\,m+6}+\frac {a^2\,x\,\left (2\,m^2+7\,m+6\right )}{2\,m^3+9\,m^2+13\,m+6}+\frac {4\,a\,b\,x^{3/2}\,\left (m^2+3\,m+2\right )}{2\,m^3+9\,m^2+13\,m+6}\right ) \]

[In]

int(x^m*(a + b*x^(1/2))^2,x)

[Out]

x^m*((b^2*x^2*(5*m + 2*m^2 + 3))/(13*m + 9*m^2 + 2*m^3 + 6) + (a^2*x*(7*m + 2*m^2 + 6))/(13*m + 9*m^2 + 2*m^3
+ 6) + (4*a*b*x^(3/2)*(3*m + m^2 + 2))/(13*m + 9*m^2 + 2*m^3 + 6))